4. Integration by Parts

Recall:       \(\displaystyle \int u\,dv=u\,v-\int v\,du\)   where   \(du=\dfrac{du}{dx}\,dx\)   and   \(dv=\dfrac{dv}{dx}\,dx\)

d. Recurrence of the Integral

1. Solving for the Integral

Sometimes, no matter what parts are selected, the integral never seems to get simpler. However, in special cases, usually involving products of \(e^{ax}\), \(\sin ax\) or \(\cos ax\), a repeated integration by parts yields a recurrence of the original integral. Such is the case in the following example. Solving such problems usually requires two successive integrations by parts, followed by an algebraic solution for the final integral.

Compute \(\displaystyle \int e^x\sin x\,dx\).

Since it is slightly easier to integrate \(e^x\) than \(\sin x\), first do integration by parts with \[\begin{array}{ll} u=\sin x & dv=e^x\,dx \\ du=\cos x\,dx \quad & v=e^x \end{array}\] This is the “T” in LAPTE. This gives: \[ \int e^x\sin x\,dx=e^x\sin x-\int e^x\cos x\,dx \] The resulting integral does not seem any simpler than the original one. (It just has a \(\cos x\) instead of a \(\sin x\).) However, don't get discouraged. Keep plugging away. Now do integration by parts with \[\begin{array}{ll} u=\cos x & dv=e^x\,dx \\ du=-\sin x\,dx \quad & v=e^x \end{array}\] Then the second integration gives \[\begin{aligned} \int e^x\sin x\,dx &=e^x\sin x-\left[e^x\cos x+\int e^x\sin x\,dx\right] \\ &=e^x\sin x-e^x\cos x-\int e^x\sin x\,dx \end{aligned}\] It might appear that you have gone in circles, since the remaining integral is the same as the one you started with.
Not so! Now comes the big trick:   Add \(\displaystyle \int e^x\sin x\,dx\) to both sides to get: \[ 2\int e^x\sin x\,dx=e^x\sin x-e^x\cos x+K \]

Technically, the indefinite integral, \(\displaystyle \int e^x\sin x\,dx\), on the left and right may not be the same. They may differ by a constant.

Finally, divide by \(2\) (and define \(C=\dfrac{1}{2}K\)): \[ \int e^x\sin x\,dx=\dfrac{1}{2}e^x\sin x-\dfrac{1}{2}e^x\cos x+C \] This is our answer.

We check by differentiating. If \(f(x)=\dfrac{1}{2}e^x\sin x-\dfrac{1}{2}e^x\cos x\), then \[ f'(x) =\dfrac{1}{2}e^x\sin x+\dfrac{1}{2}e^x\cos x-\dfrac{1}{2}e^x\cos x+\dfrac{1}{2}e^x\sin x =e^x\sin x \] which is the integrand we started with.

In the above example, notice that in both integrations by parts, we took \(u\) as the trig function and \(dv\) as the exponential. This is crucial. If you reverse them in the second integration by parts, you will undo the first one and you will not be able to solve for the original integral.

Starting at the second integral in the example above, we have \[ \int e^x\sin x\,dx =e^x\sin x-\int e^x\cos x\,dx \] If we choose the parts to be \[\begin{array}{ll} u=e^x & dv=\cos x\,dx \\ du=e^x\,dx \quad & v=\sin x \end{array}\] it takes us back to \[\begin{aligned} \int e^x\sin x\,dx &=e^x\sin x-(e^x\sin x-\int e^x\sin x\,dx) \\ &=e^x\sin x-e^x\sin x+\int e^x\sin x\,dx \\ &=\int e^x\sin x\,dx \end{aligned}\] and there is no way to solve for the integral.

The same trick will work for integrals of the following general forms: \[ \int e^{ax}\sin bx\,dx \qquad \text{and} \qquad \int e^{ax}\cos bx\,dx \] \[ \int \sin ax\sin bx\,dx, \quad \int \sin ax\cos bx\,dx \quad \text{and} \quad \int \cos ax\cos bx\,dx \] For the first two, an acceptable selection of parts is to take \(u\) as the trig function for both the first and second applications or to take \(u\) as the exponential function for both the first and second applications. For the last three, we can take \(u\) as the trig function with \(ax\) in both integrations by parts or take \(u\) as the trig function with \(bx\) in both integrations by parts, but we can't mix them. We will learn another method for computing the last three integrals in a later chapter on Trig Integrals.

Now you try:

What are acceptable choices for \(u\) in each application of integration by parts for the integral \(\displaystyle \int e^{ax}\cos bx\,dx\)?

One acceptable choice is \(u=\cos bx\) for the first application and \(u=\sin bx\) for the second application.
Another acceptable choice is \(u=e^{ax}\) for both applications.

Compute\(\displaystyle \int e^{3x}\cos x\,dx\)

Start with \(u=\cos x\) and \(dv=e^{3x}\,dx\).

\(\displaystyle \int e^{3x}\cos x\,dx =\dfrac{3}{10}e^{3x}\cos x+\dfrac{1}{10}e^{3x}\sin x+C\)

We first do two integrations by parts:

\(\begin{array}{ll} u=\cos x & dv=e^{3x}\,dx \\ du=-\sin x\,dx \quad & v=\dfrac{1}{3}e^{3x} \end{array}\) \[ \int e^{3x}\cos x\,dx =\dfrac{1}{3}e^{3x}\cos x+\dfrac{1}{3}\int e^{3x}\sin x\,dx \] \(\begin{array}{ll} u=\sin x & dv=e^{3x}\,dx \\ du=\cos x\,dx \quad & v=\dfrac{1}{3}e^{3x} \end{array}\) \[\begin{aligned} \int e^{3x}\cos x\,dx &=\dfrac{1}{3}e^{3x}\cos x +\dfrac{1}{3}\left(\dfrac{1}{3}e^{3x}\sin x-\dfrac{1}{3}\int e^{3x}\cos x\,dx\right) \\ &=\dfrac{1}{3}e^{3x}\cos x +\dfrac{1}{9}e^{3x}\sin x-\dfrac{1}{9}\int e^{3x}\cos x\,dx \end{aligned}\] Once again the original integral recurs on the right. So we add \(\displaystyle \dfrac{1}{9}\int e^{3x}\cos x\,dx\) to both sides to get \[ \dfrac{10}{9}\int e^{3x}\cos x\,dx=\dfrac{1}{3}e^{3x}\cos x+\dfrac{1}{9}e^{3x}\sin x+K \] Finally, we multiply by \(\dfrac{9}{10}\) and change the constant of integration: \[ \int e^{3x}\cos x\,dx=\dfrac{3}{10}e^{3x}\cos x+\dfrac{1}{10}e^{3x}\sin x+C \]

We check by differentiating: \[\begin{aligned} \dfrac{d}{dx}&\left(\dfrac{3}{10}e^{3x}\cos x+\dfrac{1}{10}e^{3x}\sin x\right) \\ &=\dfrac{9}{10}e^{3x}\cos x-\dfrac{3}{10}e^{3x}\sin x +\dfrac{3}{10}e^{3x}\sin x+\dfrac{1}{10}e^{3x}\cos x \\ &=e^{3x}\cos x \end{aligned}\]

© MYMathApps

Supported in part by NSF Grant #1123255